#include <iostream>
using std::cout;
using std::endl;
/*
14-1 Modify Car.cpp so that it also inherits from a class called Vehicle, placing appropriate member functions in Vehicle (that is, make up some member functions). Add a nondefault constructor to Vehicle, which you must call inside Car’s constructor.
*/
class Vehicle {
public:
	int price;
	
	void show(){
		cout << "This is an object of class Vehicle and the price is " << price << endl;
	}
	
	Vehicle(int price){
		this->price = price;
		show();
	}
	
};

class Engine {
public:
	void start() const {}
	void rev() const {}
	void stop() const {}
};

class Wheel {
public:
	void inflate(int psi) const {}
};

class Window {
public:
	void rollup() const {}
	void rolldown() const {}
};

class Door {
public:
	Window window;
	void open() const {}
	void close() const {}
};

class Car: public Vehicle {
public:
	Engine engine;
	Wheel wheel[4];
	Door left, right; // 2-door
	
	Car(int price):Vehicle(price) {
		
	}
};

int main(int argc, char *argv[]) {
	Car c(900);
}